package twoNode;

import java.util.Arrays;
import java.util.List;

/**
 * Created by zzy on 2018/3/14.
 */
public class twoNodeTest1 {


    static String qx="1,2,3,4,5,6"; //前序
    static String zx="3,2,4,1,6,5"; //中序

    static List<String> qxz= Arrays.asList(qx.split(","));
    static  List<String> zxz=Arrays.asList(zx.split(","));


    public static void main(String[] args) {
        Node rootNode=new Node(qxz.get(0));
        reBuild(rootNode);
        System.out.print(rootNode);

    }


    private static void reBuild(Node root){
        String value=root.getValue();
        int index=zxz.indexOf(value);

    }

}

class Node{
    private Node left;
    private Node right;
    private String value;

    public Node(String value) {
        this.value = value;
    }

    public Node getLeft() {
        return left;
    }

    public void setLeft(Node left) {
        this.left = left;
    }

    public Node getRight() {
        return right;
    }

    public void setRight(Node right) {
        this.right = right;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    @Override
    public String toString() {
        return "Node{" +
                "left=" + left +
                ", right=" + right +
                ", value='" + value + '\'' +
                '}';
    }
}